﻿var mongoose = require('mongoose')
mongoose.connect('mongodb://localhost:27017/zanime', { useMongoClient: true })
//193.112.97.63
var Schema = mongoose.Schema

var animeSchema = new Schema({
   title:String,
   id:String,
   area:String,
   year:Number,
   month:Number,
   day:Number,
   tags:[{ type:String }],
   update:Number,
   zValue:Number,
   updateDate:String,
   content:String,
   imgSrc:String,
   imgSrc_F:String,
   panUrl:String,
   start:Number,
   episodes:[
      { 
         title: String, 
         url: String,
         typeValue: Number 
      }
   ],
});

// 表单
var Animes = mongoose.model('Animes', animeSchema)


// 直接导出模型构造函数
module.exports = Animes